bmips: use led-sources for ath9k
authorRosen Penev <[email protected]>
Sat, 6 Dec 2025 03:34:37 +0000 (19:34 -0800)
committerRobert Marko <[email protected]>
Mon, 8 Dec 2025 16:28:40 +0000 (17:28 +0100)
Avoids having to create a custom LED for wifi.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21058
Signed-off-by: Robert Marko <[email protected]>
target/linux/bmips/dts/bcm6328-dlink-dsl-2750b-b1.dts
target/linux/bmips/dts/bcm6358-huawei-hg556a-a.dts
target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts

index d7e476b236ac5672d773f3d6965df6bc7c29b777..0127896ec5bf6b7d6b015411da9bc81e2445c997 100644 (file)
                        linux,default-trigger = "usbport";
                };
        };
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               led-8 {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&ath9k 8 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &leds {
                device_type = "pci";
                ranges;
 
-               ath9k: wifi@0,0 {
+               wifi@0,0 {
                        compatible = "pci168c,002e";
                        reg = <0 0 0 0 0>;
 
                        nvmem-cells = <&macaddr_cfe_6a0 1>, <&cal_data_1000>;
                        nvmem-cell-names = "mac-address", "calibration";
 
-                       #gpio-cells = <2>;
-                       gpio-controller;
+                       led {
+                               led-sources = <8>;
+                       };
                };
        };
 };
index 0c38dc3e7a86c3a92cadb1b86fec2c53b599c1f4..2a7399a97094164a802168ba93d2e9ba4848d8b2 100644 (file)
@@ -5,17 +5,6 @@
 / {
        model = "Huawei EchoLife HG556a (version A)";
        compatible = "huawei,hg556a-a", "brcm,bcm6358";
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               led-2 {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_RED>;
-                       gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &gpio_keys {
@@ -58,7 +47,7 @@
 &pci {
        status = "okay";
 
-       ath9k: wifi@1,0 {
+       wifi@1,0 {
                compatible = "pci168c,ff1d";
                reg = <0x0800 0 0 0 0>;
 
@@ -67,7 +56,8 @@
                nvmem-cells = <&macaddr_cfe_6a0 1>;
                nvmem-cell-names = "mac-address";
 
-               #gpio-cells = <2>;
-               gpio-controller;
+               led {
+                       led-sources = <2>;
+               };
        };
 };
index 925dce4f49199f9aab02339605626071a7d94071..37e1b6e50690ba27acad303963e3ffa4656a7f35 100644 (file)
@@ -5,17 +5,6 @@
 / {
        model = "Huawei EchoLife HG556a (version B)";
        compatible = "huawei,hg556a-b", "brcm,bcm6358";
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               led-2 {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_RED>;
-                       gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &gpio_keys {
@@ -58,7 +47,7 @@
 &pci {
        status = "okay";
 
-       ath9k: wifi@1,0 {
+       wifi@1,0 {
                compatible = "pci168c,0029";
                reg = <0x0800 0 0 0 0>;
 
@@ -67,7 +56,8 @@
                nvmem-cells = <&macaddr_cfe_6a0 1>;
                nvmem-cell-names = "mac-address";
 
-               #gpio-cells = <2>;
-               gpio-controller;
+               led {
+                       led-sources = <2>;
+               };
        };
 };